package cn.idietrade.idietradegoodsmodule8002.service.carservice.impl;

import cn.idietrade.common.pojo.SecondShoppingCart;
import cn.idietrade.idietradegoodsmodule8002.mapper.SecondShoppingCartMapper;
import cn.idietrade.idietradegoodsmodule8002.service.carservice.SecondShoppingCartService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zjy
 * @version 1.0
 * @createTime 2022-12-21 11:56
 * @description
 */
@Service
public class SecondShoppingCartServiceImpl implements SecondShoppingCartService {
    @Resource
    private SecondShoppingCartMapper secondShoppingCartMapper;

    @Override
    public List<SecondShoppingCart> queryShoppingCartUId(Integer userId,Integer goodsId) {
        return secondShoppingCartMapper.queryShoppingCartUId(userId,goodsId);
    }

    @Override
    public int deleShoppingGoods(Integer userId, Integer goodsId) {
        return secondShoppingCartMapper.deleShoppingGoods(userId,goodsId);
    }

    @Override
    public int addShoppingGoods(Integer userId, Integer goodsId) {
        return secondShoppingCartMapper.addShoppingGoods(userId,goodsId);
    }

    @Override
    public int updateAddShoppingGoods(Integer userId, Integer goodsId) {
        return secondShoppingCartMapper.updateAddShoppingGoods(userId,goodsId);
    }

    @Override
    public int selectOneShoppingGoods(Integer userId, Integer goodsId) {
        return secondShoppingCartMapper.selectOneShoppingGoods(userId,goodsId);
    }

    @Override
    public int updateShoppingCart(Integer userId, Integer goodsId, Integer num) {
        return secondShoppingCartMapper.updateShoppingCart(userId,goodsId,num);
    }
}
